<template>
    <el-config-provider :locale="locale">
        <router-view v-slot="{ Component, route }">
            <keep-alive>
                <component
                    :is="Component"
                    :key="route.path"
                />
            </keep-alive>
        </router-view>
    </el-config-provider>
</template>

<script>
import { reactive, toRefs} from 'vue'
import { ElConfigProvider } from 'element-plus'
import zhCn from 'element-plus/lib/locale/lang/zh-cn'
export default {
    name: 'App',
    components: {
        ElConfigProvider
    },
    setup () {
        const state = reactive({
            locale: zhCn
        })
        return {
            ...toRefs(state)
        }
    }
}
</script>

<style lang="scss" scoped>

</style>